import request from "@/utils/request";

// 查询等级列表
export function listLevel(query) {
  return request({
    url: "/system/level/list",
    method: "get",
    params: query,
  });
}

// 查询等级列表
export function innerListLevel(query) {
  return request({
    url: "/system/level/innerList",
    method: "get",
    params: query,
  });
}

// 查询等级详细
export function getLevel(levelId) {
  return request({
    url: "/system/level/" + levelId,
    method: "get",
  });
}

// 新增等级
export function addLevel(data) {
  return request({
    url: "/system/level",
    method: "post",
    data: data,
  });
}

// 修改等级
export function updateLevel(data) {
  return request({
    url: "/system/level",
    method: "put",
    data: data,
  });
}

// 删除等级
export function delLevel(levelId) {
  return request({
    url: "/system/level/" + levelId,
    method: "delete",
  });
}

// 商品列表
export function getMallSpuList(query) {
  return request({
    url: "/mall/mallSpu/innerList",
    method: "get",
    params: query,
  });
}
